import java.io.*;

public class Demo13 {
    public static void main(String[] args) {
        try(OutputStream outputStream=new FileOutputStream("d:/test/AAA/test.txt")) {
            PrintWriter writer=new PrintWriter(outputStream);
            writer.write("hello word");
            writer.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
